package org.acompanhamento.domain;

import java.util.Collections;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;

import jmine.tec.aom.domain.Property;
import jmine.tec.persist.annotation.Alias;
import jmine.tec.persist.annotation.Index;
import bancosys.tec.component.Documentation;
import bancosys.tec.persist.persister.annotation.NaturalKey;

/**
 * 
 * @author lundberg
 *
 */
@Entity
@Table(name = "MEMBER")
@Alias("MEMBER")
@Documentation("AGILE TEAM MEMBER")
@SequenceGenerator(name = "SEQ_MEMBER", sequenceName = "SEQ_MEMBER")
public class Member extends PropertizedEntity {

	private Long id;
	
	private String name;
	
	@Id
	@GeneratedValue(generator = "SEQ_MEMBER")
	@Column(name = "COD_MEMBER", nullable = false)
	@Documentation("TEAM MEMBER ID")
	public Long getId() {
		return id;
	}

	@NaturalKey
	@Index(suffix = "0")
	@Documentation("MEMBER NAME")
	@Column(name = "NAME", nullable = false)
	public String getName() {
		return name;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	@Transient
	protected Set<Property> getEntityProperties() {
		return Collections.emptySet();
	}
}
